package com.ckerchina.admin.ckadmin.domain.mgr;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.ckerchina.admin.ckadmin.domain.IdEntity.IdEntityAuto;

@Table(indexes = { @Index(name = "IDX_muserId_menuId", columnList = "muserId,menuId", unique = true) })
@Entity
public class MgrUserAndMenu extends IdEntityAuto {
	private static final long serialVersionUID = 1L;

	@NotNull
	private Long muserId;

	@NotNull
	private Long menuId;

	private int state = 1;

	public MgrUserAndMenu() {
		super();
	}

	public MgrUserAndMenu(Long muserId, Long menuId, int state) {
		super();
		this.muserId = muserId;
		this.menuId = menuId;
		this.state = state;
	}

	public Long getMuserId() {
		return muserId;
	}

	public void setMuserId(Long muserId) {
		this.muserId = muserId;
	}

	public Long getMenuId() {
		return menuId;
	}

	public void setMenuId(Long menuId) {
		this.menuId = menuId;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

}
